home *** CD-ROM | disk | FTP | other *** search
- Path: newshost.vvm.com!news
- From: Arun Nair <arun@ns.vvm.com>
- Newsgroups: comp.lang.c++
- Subject: Help! Allocating 3 dimensional or greater arrays in C++
- Date: Mon, 29 Jan 1996 05:50:23 -0800
- Organization: VVM, Inc.
- Message-ID: <310CD09F.1D71@ns.vvm.com>
- NNTP-Posting-Host: k1slip8.vvm.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b5 (Win16; I)
-
- I have been trying to allocate a 3 dimensional array in C++.
-
- void main()
- {
- int *matrix;
- int **pmatrix = &matrix;
- int ***ppmatrix = &pmatrix;
- int size;
- matrix = new int[10];
- pmatrix = new matrix[10];
- ppmatrix = new pmatrix[10];
- .
- .
- .
- .
-
- What is wrong with the above code? I have searched the
- C++ faqs and a couple of other books for this answer but so far
- I have not been able to get an answer. If any of you can help me
- in this regard I would be grateful.
-
- Thanks in advance,
-
- with best regards,
-
- Arun
- (arun@ns.vvm.com)
-